import request from '@/utils/http/request'

export interface CategoryModel {
    id: number,
    name: string,
    category1Id?: number,
    category2Id?: number
}

  export const getCategory1 = () => {
    return request.get<any, CategoryModel[]>('/admin/product/getCategory1')
  }
  export const getCategory2 = (category1Id: number) => {
    return request.get<any, CategoryModel[]>(`/admin/product/getCategory2/${category1Id}`)
  }
  export const getCategory3 = (category2Id: number) => {
    return request.get<any, CategoryModel[]>(`/admin/product/getCategory3/${category2Id}`)
  }